//
// Created by v on 19-5-23.
//

#ifndef OPENGLFUNC_OPENGLQTEASY_H
#define OPENGLFUNC_OPENGLQTEASY_H

#include <QtGui/QOpenGLFunctions>
#include "QtWidgets/QOpenGLWidget"
#include "QtWidgets/QWidget"

class OpenGLQtEasy : public QOpenGLWidget, protected QOpenGLFunctions {
public:
    explicit OpenGLQtEasy(int width, int height, QWidget *parent = 0);
    ~OpenGLQtEasy();

    void renderDisplay(const QImage &image);

protected:
    void initializeGL();
    void paintGL();
    void resizeGL(int width, int height);

private:
    int m_width;
    int m_height;
    QImage  m_image;
};


#endif //OPENGLFUNC_OPENGLQTEASY_H
